package com.bnp.reporting.java8.lambda;

/**
 * Created by adib on 09/11/14.
 */
public class UseRunnableLambda {
    public static void main(String[] args) {

        Runnable runnable1 = () -> System.out.println("Run Thread 1");

        Runnable runnable2 = () -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("Run Thread 2");
        };

        new Thread(runnable1).start();
        new Thread(runnable2).start();
    }
}
